package com.example.utils;

import java.security.SecureRandom;

public class SaltUtil {
    public static String getSalt() {

        SecureRandom random = new SecureRandom();
        byte[] saltV = new byte[16];
        random.nextBytes(saltV);
        StringBuilder hexSalt = new StringBuilder();
        for (byte b : saltV) {
            hexSalt.append(String.format("%02x", b));
        }
        String salt = hexSalt.toString();
        return salt;
    }
}
